﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Farigola.Engine.SystemData.Entity
{
    /// <summary>
    /// Some general definition.
    ///
    /// </summary>
    public class EntityDef
    {
        //=====================================================================
        // General internal GUID/UUID definition.

        /// The guid for the folder typeClass.
        /// do not change it! must be always the same.
        public static String TypeFolderValGuid = "41856A68-E9BF-11DE-8579-15C955D89593";
        public static String TypeFolderName = "folder";

        /// The guid for the string typeClass.
        /// do not change it! must be always the same.
        public static String TypeStringValGuid = "BAC61247-EC7F-4b5a-8AEE-C5AB2FEE54FE";
        public static String TypeStringName = "string";

        /// The guid for the int typeClass.
        /// do not change it! must be always the same.
        public static String TypeIntValGuid = "8537E47A-DFE2-437b-BBDA-54008435B00C";
        public static String TypeIntName = "int";

        /// The guid for the double typeClass.
        /// do not change it! must be always the same.
        public static String TypeDoubleValGuid = "540171CD-2D77-4be6-ADC7-A44F432013CC";
        public static String TypeDoubleName = "double";

        /// The guid for the list typeClass.
        /// do not change it! must be always the same.
        public static String TypeStructSingleValGuid = "41CCC5E6-8586-4c11-A5AA-2314873A82DC";
        public static String TypeStructSingleName = "single";

        /// The guid for the list typeClass.
        /// do not change it! must be always the same.
        public static String TypeStructListValGuid = "E8493FD7-5745-4997-857D-E1B38D89F5DD";
        public static String TypeStructListName = "list";

        //=====================================================================
        // General internal name definition.

        /**
         * 
         * the root folder of the project
         */
        public static String prjRootFolderName = "$$$prj_root";

        //*   $$$prj_system    system/internal data of the project
        public static String prjRootSystemFolderName = "$$$prj_root_system";

        //*   $$$prj_user        user data, types and entities
        public static String prjRootUserFolderName = "$$$prj_root_user";

        //=====================================================================

        /// Entities can be system or user.
        /// builtIn data (types and instances) are system type.
        public enum TypeSystOrUser
        {
            System,

            User
        }

        /// for entitties,
        /// List of instance access mode, 
        ///  -create a new instance,
        ///  -ref to an existing instance.
        ///  -any of cases possibles
        ///  
        /// TypeEntInstAccessMode
        /// </summary>
        public enum TypeInstanceAccessMode
        {
            Undefined,

            // the instance is created automatically, and can't be null
            NewInstanceNotNull,

            // the instance is created automatically, but can be null, at the start step and after
            NewInstanceNull,

            // don't create an instance, link/ref to an existing instance
            RefToExistingInstance,

            // first tome,all cases are possibles: NewInst.., refTo
            AllPossibles
        }

    }
}
